import {Generator} from "./Generator";
import {PluginFunctionType, Point} from "../../nodeApp/static/lib/crowncad-plugin-sdk-0.0.1";

class MirrorGenerator extends Generator {
    constructor() {
        super();
    }

    /**
     * 创建镜像
     */
    createMirrorInstance(insId, mirrorPlaneId, mirrorPlaneInstanceId, cb=()=>{}) {
        const assembly = this.command.assembly;
        assembly.mirrorInstances({
            //instanceId: insId.id,
            instanceId: 60,
            //mirrorPlaneId: mirrorPlaneId.id,
            mirrorPlaneId: 22,
            mirrorPlaneInstanceId:''
            },'mirrorInstances');

        this.command.execute().then(() => {  // 执行
            this.command.clearCommand();
            cb();
        });
    }
}

const mirrorGenerator = new MirrorGenerator();
export {mirrorGenerator};
